package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;


@RestController
public class LogoutController {

    //去清楚除session值
    @RequestMapping("logout")
    public void logout(HttpServletRequest request){

        //清除session值
        request.getSession().invalidate();

    }


}
